<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>warp</title>
    <style>


        /*超出省略号*/

        /*单行超出省略号*/
        .sin-ellipsis {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap
        }

        /*多行超出省略号*/

        .s1{
            width: 50px;
            white-space: nowrap;
        }
        .s2{
            border: 1px solid;
            width: 8em;
            overflow-wrap: normal;
            word-break: break-all;
            white-space: normal;
        }
        .s3{
            border: 1px solid;
            width: 8em;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .s4 {
            width: 8em;
            border: 1px solid;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            word-break: break-all;
        }
        .s5{
            width:400px;
            margin:0 auto;
            overflow : hidden;
            border:1px solid #ccc;
            text-overflow: ellipsis;
            padding:0 10px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            line-height:30px;
            height:60px;
        }
    </style>
</head>
<body>
    <div class="c1">
        This is a long and Supercalifragilisticexpialidocious sentence. 一二三四五六，七八九零一二，这是一句巨长巨长又没有空间可以换行的句子哦。
    </div>
    <br>
    <br>
    <div class="c1 mul-ellipsis">
        This is a long and Supercalifragilisticexpialidocious sentence. 一二三四五六，七八九零一二，这是一句巨长巨长又没有空间可以换行的句子哦。
    </div>

<p>单行不换行</p>
<div class="s1">
    This is a long and Supercalifragilisticexpialidocious sentence. 一二三四五六，七八九零一二，这是一句巨长巨长又没有空间可以换行的句子哦。
</div>
    <p>自由换行,打断所有单词</p>
    <div class="s2">
        This is a long and Supercalifragilisticexpialidocious sentence. 一二三四五六，七八九零一二，这是一句巨长巨长又没有空间可以换行的句子哦。
    </div>
    <p>单行省略</p>
    <div class="s3">
        This is a long and Supercalifragilisticexpialidocious sentence. 一二三四五六，七八九零一二，这是一句巨长巨长又没有空间可以换行的句子哦。
    </div>

    <p>多行省略</p>
    <div class="s4">
        This is a long and Supercalifragilisticexpialidocious sentence. 一二三四五六，七八九零一二，这是一句巨长巨长又没有空间可以换行的句子哦。
    </div>
    <div class="s5">
        This is a long and Supercalifragilisticexpialidocious sentence. 一二三四五六，七八九零一二，这是一句巨长巨长又没有空间可以换行的句子哦。
    </div>


</body>
</html>
